home *** CD-ROM | disk | FTP | other *** search
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • File Name: State_Storage_Manager.c •
- • ---------- •
- • •
- • Copyright © 1990 Apple Computer, Inc. All Rights Reserved •
- • •
- • Description •
- • ----------- •
- • This file contains the access routines to the state_storage record •
- • of the SLUDGE cdev. This record contains the current state (values)•
- • of the SLUDGE cdev. It is saved as a resource of the cdev file •
- • when SLUDGE is not active. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 2/20/90 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
-
- #include "State_Storage_Manager.h"
- #include <Dialogs.h>
- #include <Resources.h>
- #include <Memory.h>
- #include <Errors.h>
- #include <Devices.h>
- #include <Packages.h>
-
-
-
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Function Name: Set_State_Storage_Recommended_CDEV_Return_Value •
- • -------------- •
- • •
- • Description •
- • ----------- •
- • This function sets the resource error condition true. •
- • •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 7/25/89 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- void Set_State_Storage_Recommended_CDEV_Return_Value(Handle cdevStorage, long value)
- {
- HLock(cdevStorage);
- ((State_Storage_Pointer) *cdevStorage)->State_Storage_Recommended_CDEV_Return_Value = value;
- HUnlock(cdevStorage);
-
- }
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Function Name: Set_Resource_Error_Condition •
- • -------------- •
- • •
- • Description •
- • ----------- •
- • This function sets the resource error condition true. •
- • •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 7/25/89 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- void Set_Resource_Error_Condition(Handle cdevStorage)
- {
- HLock(cdevStorage);
- ((State_Storage_Pointer) *cdevStorage)->Allocated_State = false;
- ((State_Storage_Pointer) *cdevStorage)->Resource_Error_State = true;
- HUnlock(cdevStorage);
-
- }
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Function Name: Write_State_Resource •
- • -------------- •
- • •
- • Description •
- • ----------- •
- • This command writes the current contents of the state storage to •
- • the state storage resource. This command should be called by every •
- • routine (except Set_Resource_Error_Condition) that changes the state•
- • storage data. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 7/25/89 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- void Write_State_Resource(Handle cdevStorage)
- {
- short res_error;
- short junk;
-
- HLock(cdevStorage);
- ChangedResource( cdevStorage);
-
- res_error = ResError();
-
- /*••••••••••••••••••••••••••••••••••••••••••
- • •
- • If the resource can not be changed •
- • then put up the proper alert, set •
- • stae manager error condition, and •
- • recommend a CDEV return value. •
- • •
- ••••••••••••••••••••••••••••••••••••••••••*/
- if (res_error != noErr)
- {
- junk = StopAlert(1,nil);
- Set_Resource_Error_Condition(cdevStorage);
- Set_State_Storage_Recommended_CDEV_Return_Value(cdevStorage,cdevGenErr);
- }
-
- WriteResource(cdevStorage);
- HUnlock(cdevStorage);
-
- }
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Function Name: Set_Allocated_Condition •
- • -------------- •
- • •
- • Description •
- • ----------- •
- • This function sets the allocated condition true. •
- • •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 7/25/89 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- void Set_Allocated_Condition(Handle cdevStorage)
- {
- HLock(cdevStorage);
- ((State_Storage_Pointer) *cdevStorage)->Allocated_State = true;
- ((State_Storage_Pointer) *cdevStorage)->Resource_Error_State = false;
- HUnlock(cdevStorage);
-
- Write_State_Resource(cdevStorage);
- }
-
- /*••••••••••••••••••••••••••••••••••••••••••
- • •
- • On/Off button manager state routines •
- • •
- ••••••••••••••••••••••••••••••••••••••••••*/
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Function Name: Set_On_Off_Error_Condition •
- • -------------- •
- • •
- • Description •
- • ----------- •
- • This function sets the On/Off button error condition to the •
- • passed Boolean value. •
- • •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 7/20/89 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- void Set_On_Off_Error_Condition(Handle cdevStorage, Boolean value)
- {
- HLock(cdevStorage);
- ((State_Storage_Pointer) *cdevStorage)->On_Off_Error_Condition = value;
- HUnlock(cdevStorage);
-
- Write_State_Resource(cdevStorage);
- }
-
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Function Name: Get_On_Off_Error_Condition •
- • -------------- •
- • •
- • Description •
- • ----------- •
- • This query returns the On/Off button error condition. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 7/20/89 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- Boolean Get_On_Off_Error_Condition(Handle cdevStorage)
- {
- Boolean rvalue;
-
- HLock(cdevStorage);
- rvalue = ((State_Storage_Pointer) *cdevStorage)->On_Off_Error_Condition;
- HUnlock(cdevStorage);
-
- return(rvalue);
- }
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Function Name: Set_On_Off_Recommended_CDEV_Return_Value •
- • -------------- •
- • •
- • Description •
- • ----------- •
- • This command sets the On/Off button's recommended CDEV return value •
- • to the passed value. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 7/20/89 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- void Set_On_Off_Recommended_CDEV_Return_Value(Handle cdevStorage, long value)
- {
- HLock(cdevStorage);
- ((State_Storage_Pointer) *cdevStorage)->On_Off_Recommended_CDEV_Return_Value = value;
- HUnlock(cdevStorage);
-
- Write_State_Resource(cdevStorage);
- }
-
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Function Name: Get_On_Off_Recommended_CDEV_Return_Value •
- • -------------- •
- • •
- • Description •
- • ----------- •
- • This query returns the On/Off button's recommended CDEV return •
- • value. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 7/20/89 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- long Get_On_Off_Recommended_CDEV_Return_Value(Handle cdevStorage)
- {
- short rvalue;
-
- HLock(cdevStorage);
- rvalue = ((State_Storage_Pointer) *cdevStorage)->On_Off_Recommended_CDEV_Return_Value;
- HUnlock(cdevStorage);
-
- return(rvalue);
- }
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Function Name: SetUp_State_Storage •
- • -------------- •
- • •
- • Description •
- • ----------- •
- • This command allocates the CDEV storage in the passed Handle. •
- • •
- • If there is enough memory available for the allocation then •
- • Allocated is the resulting state, otherwise the resulting state •
- • is Nil Storage. •
- • •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 7/20/89 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- void SetUp_State_Storage(Handle *cdevStorage)
- {
-
- if (Count1Resources('SRES') != 0)
- *cdevStorage = Get1Resource('SRES', 0);
- else
- {
- *cdevStorage = NewHandle(sizeof(State_Storage_Record));
- if (MemError() != noErr)
- *cdevStorage = nil;
- else
- {
- HLock(*cdevStorage);
-
- ((State_Storage_Pointer) **cdevStorage)->Sludge_Factor = 0;
-
- AddResource(*cdevStorage, 'SRES', 0, "\015State Storage");
- if (ResError() != noErr)
- DebugStr("\022AddResource failed");
-
-
- Write_State_Resource(*cdevStorage);
- HUnlock(*cdevStorage);
-
- Set_Allocated_Condition(*cdevStorage);
-
-
- Set_ONFF_Value(*cdevStorage, false);
-
- }
- }
- }
-
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Function Name: State_Storage_Allocated •
- • -------------- •
- • •
- • Description •
- • ----------- •
- • This query returns true if the storage in the passed Handle is in •
- • the Allocated state or false if it is in the Nil Storage state. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 7/20/89 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- Boolean State_Storage_Allocated(Handle cdevStorage)
- {
- Boolean rvalue;
-
- HLock(cdevStorage);
- rvalue = ((State_Storage_Pointer) *cdevStorage)->Allocated_State;
- HUnlock(cdevStorage);
-
- return(rvalue);
- }
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Function Name: State_Storage_Nil •
- • -------------- •
- • •
- • Description •
- • ----------- •
- • This query returns true if and only if the storage in the passed •
- • Handle is in the Nil storage state. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 7/25/89 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- Boolean State_Storage_Nil(Handle cdevStorage)
- {
- return(cdevStorage == nil);
- }
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Function Name: State_Storage_Resource_Error •
- • -------------- •
- • •
- • Description •
- • ----------- •
- • This query returns true if and only if the storage in the passed •
- • Handle is in the resource error storage state. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 7/25/89 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- Boolean State_Storage_Resource_Error(Handle cdevStorage)
- {
- Boolean rvalue;
-
- HLock(cdevStorage);
- rvalue = ((State_Storage_Pointer) *cdevStorage)->Resource_Error_State;
- HUnlock(cdevStorage);
-
- return(rvalue);
- }
-
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Function Name: Get_State_Storage_Recommended_CDEV_Return_Value •
- • -------------- •
- • •
- • Description •
- • ----------- •
- • This query returns the State Storage manager's recommended CDEV •
- • return value. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 7/25/89 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- long Get_State_Storage_Recommended_CDEV_Return_Value(Handle cdevStorage)
- {
- long rvalue;
-
- HLock(cdevStorage);
- rvalue = ((State_Storage_Pointer) *cdevStorage)->State_Storage_Recommended_CDEV_Return_Value;
- HUnlock(cdevStorage);
-
- return(rvalue);
- }
-
-
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Function Name: Get_ONFF_Value •
- • -------------- •
- • •
- • Description •
- • ----------- •
- • This query returns the value of the ONFF resource. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 7/20/89 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- short Get_ONFF_Value(Handle cdevStorage)
- {
- Boolean rvalue;
-
- HLock(cdevStorage);
- rvalue = ((State_Storage_Pointer) *cdevStorage)->ONFF_Value;
- HUnlock(cdevStorage);
-
- return(rvalue);
- }
-
-
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Function Name: Set_ONFF_Value •
- • -------------- •
- • •
- • Description •
- • ----------- •
- • This command sets value of the ONFF resource to the passed value. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 7/20/89 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- void Set_ONFF_Value(Handle cdevStorage, short value)
- {
- HLock(cdevStorage);
- ((State_Storage_Pointer) *cdevStorage)->ONFF_Value = value;
- HUnlock(cdevStorage);
-
- Write_State_Resource(cdevStorage);
- }
-
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Identifier: Set_Sludge_Factor •
- • ----------- •
- • •
- • Description •
- • ----------- •
- • This function sets the SLUDGE factor to the passed value. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 2/20/90 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- void Set_Sludge_Factor(Handle cdevStorage, int new_value)
- {
- HLock(cdevStorage);
- ((State_Storage_Pointer) *cdevStorage)->Sludge_Factor = new_value;
- HUnlock(cdevStorage);
-
- Write_State_Resource(cdevStorage);
- }
-
-
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Identifier: Increment_Sludge_Factor •
- • ----------- •
- • •
- • Description •
- • ----------- •
- • This function increments the SLUDGE factor. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 2/20/90 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- void Increment_Sludge_Factor(Handle cdevStorage)
- {
- HLock(cdevStorage);
- if (((State_Storage_Pointer) *cdevStorage)->Sludge_Factor < 999)
- ((State_Storage_Pointer) *cdevStorage)->Sludge_Factor++;
- HUnlock(cdevStorage);
-
- Write_State_Resource(cdevStorage);
- }
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Identifier: Decrement_Sludge_Factor •
- • ----------- •
- • •
- • Description •
- • ----------- •
- • This function decrements the SLUDGE factor. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 2/20/90 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- void Decrement_Sludge_Factor(Handle cdevStorage)
- {
- HLock(cdevStorage);
- if (((State_Storage_Pointer) *cdevStorage)->Sludge_Factor > 0)
- ((State_Storage_Pointer) *cdevStorage)->Sludge_Factor--;
- HUnlock(cdevStorage);
-
- Write_State_Resource(cdevStorage);
- }
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Identifier: Get_Sludge_Factor •
- • ----------- •
- • •
- • Description •
- • ----------- •
- • This function returns the SLUDGE factor. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 2/20/90 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- long Get_Sludge_Factor(Handle cdevStorage)
- {
- long rvalue;
-
- HLock(cdevStorage);
- rvalue = ((State_Storage_Pointer) *cdevStorage)->Sludge_Factor;
- HUnlock(cdevStorage);
-
- return(rvalue);
-
- }
-
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Identifier: Set_About_Box_State •
- • ----------- •
- • •
- • Description •
- • ----------- •
- • This function sets the about box state to true. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 2/20/90 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- void Set_About_Box_State(Handle cdevStorage)
- {
- HLock(cdevStorage);
- ((State_Storage_Pointer) *cdevStorage)->About_Box_State = true;
- HUnlock(cdevStorage);
-
- Write_State_Resource(cdevStorage);
- }
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Identifier: Clear_About_Box_State •
- • ----------- •
- • •
- • Description •
- • ----------- •
- • This function sets the about box state to false. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 2/20/90 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- void Clear_About_Box_State(Handle cdevStorage)
- {
- HLock(cdevStorage);
- ((State_Storage_Pointer) *cdevStorage)->About_Box_State = false;
- HUnlock(cdevStorage);
-
- Write_State_Resource(cdevStorage);
- }
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Identifier: In_About_Box_State •
- • ----------- •
- • •
- • Description •
- • ----------- •
- • This returns true if the cdev is in the about box state, false •
- • otherwise. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 2/20/90 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- Boolean In_About_Box_State(Handle cdevStorage)
- {
- Boolean rvalue;
-
- HLock(cdevStorage);
- rvalue = ((State_Storage_Pointer) *cdevStorage)->About_Box_State;
- HUnlock(cdevStorage);
-
- return(rvalue);
- }
-
-
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Identifier: Set_Original_A_TRAP_Exception_Vector_Value •
- • ----------- •
- • •
- • Description •
- • ----------- •
- • This function saves the value for the original a-trap exception •
- • vector. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 2/20/90 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- void Set_Original_A_TRAP_Exception_Vector_Value(Handle cdevStorage, Ptr value)
- {
- HLock(cdevStorage);
- ((State_Storage_Pointer) *cdevStorage)->Original_A_TRAP_Exception_Vector_Value = value;
- HUnlock(cdevStorage);
-
- Write_State_Resource(cdevStorage);
- }
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Identifier: Get_Original_A_TRAP_Exception_Vector_Value •
- • ----------- •
- • •
- • Description •
- • ----------- •
- • This function returns the value for the saved a-trap exception •
- • vector. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 2/20/90 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- Ptr Get_Original_A_TRAP_Exception_Vector_Value(Handle cdevStorage)
- {
- Ptr rvalue;
-
- HLock(cdevStorage);
- rvalue = ((State_Storage_Pointer) *cdevStorage)->Original_A_TRAP_Exception_Vector_Value;
- HUnlock(cdevStorage);
-
- return(rvalue);
- }
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Identifier: Set_Original_JUMP_TRACE_Exception_Vector_Value •
- • ----------- •
- • •
- • Description •
- • ----------- •
- • This function saves the value for the original a-jump_trace •
- • exception vector. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 2/20/90 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- void Set_Original_JUMP_TRACE_Exception_Vector_Value(Handle cdevStorage, Ptr value)
- {
- HLock(cdevStorage);
- ((State_Storage_Pointer) *cdevStorage)->Original_JUMP_TRACE_Exception_Vector_Value = value;
- HUnlock(cdevStorage);
-
- Write_State_Resource(cdevStorage);
- }
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Identifier: Get_Original_JUMP_TRACE_Exception_Vector_Value •
- • ----------- •
- • •
- • Description •
- • ----------- •
- • This function returns the value for the saved jump_trace exception •
- • vector. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 2/20/90 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- Ptr Get_Original_JUMP_TRACE_Exception_Vector_Value(Handle cdevStorage)
- {
- Ptr rvalue;
-
- HLock(cdevStorage);
- rvalue = ((State_Storage_Pointer) *cdevStorage)->Original_JUMP_TRACE_Exception_Vector_Value;
- HUnlock(cdevStorage);
-
- return(rvalue);
- }
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Identifier: Set_Location_Of_Parasite_Resource •
- • ----------- •
- • •
- • Description •
- • ----------- •
- • This function saves the location of the parasite resource. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 2/20/90 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- void Set_Location_Of_Parasite_Resource(Handle cdevStorage, Handle value)
- {
- HLock(cdevStorage);
- ((State_Storage_Pointer) *cdevStorage)->Location_Of_Parasite_Resource = value;
- HUnlock(cdevStorage);
-
- Write_State_Resource(cdevStorage);
- }
-
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- • •
- • Identifier: Get_Location_Of_Parasite_Resource •
- • ----------- •
- • •
- • Description •
- • ----------- •
- • This function returns the value for the saved jump_trace exception •
- • vector. •
- • •
- • History •
- • ------- •
- • •
- • Author Date Description •
- • ------------------------------------------------------------------ •
- • Kevin McEntee 2/20/90 Original Implementation •
- • •
- • •
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
- Handle Get_Location_Of_Parasite_Resource(Handle cdevStorage)
- {
- Handle rvalue;
-
- HLock(cdevStorage);
- rvalue = ((State_Storage_Pointer) *cdevStorage)->Location_Of_Parasite_Resource;
- HUnlock(cdevStorage);
-
- return(rvalue);
- }
-
-